﻿<UserControl x:Class="Microsoft.Research.ScientificWorkflow.ManagementStudioControls.RegistryManagerModule.WorkflowCatalogCenterPane"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   Width="Auto" Height="Auto" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:Custom="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
    <UserControl.Resources>
        <BooleanToVisibilityConverter x:Key="boolToVisibilty"/>

        <!--Style for all the TextBlock-->
        <Style TargetType="{x:Type TextBlock}" >
            <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=Text }"></Setter>
            <Setter Property="TextTrimming" Value="CharacterEllipsis"></Setter>
        </Style>

        <BooleanToVisibilityConverter x:Key="boolToVisibilityConverter"/>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,0.665" StartPoint="0.5,0">
                <GradientStop Color="#FFFFFFFF" Offset="0"/>
                <GradientStop Color="#FFF3F3F3" Offset="1"/>
            </LinearGradientBrush>
        </Grid.Background>
        <Grid HorizontalAlignment="Stretch"  VerticalAlignment="Stretch" Grid.Column="0">
            <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CornerRadius="4,4,4,4" BorderThickness="1,1,1,1" 
                        Background="#FFFFFFFF" BorderBrush="#FFE0E0E0"
                    Visibility="{Binding Converter={StaticResource boolToVisibilty}, Path=ShowWorkflowDetails}">
                <Grid Margin="0,0,0,0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="36"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Border CornerRadius="5,5,0,0" Grid.Row="1">
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FFFBFBFB" Offset="0"/>
                                <GradientStop Color="#FFF0F0F0" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.Background>
                        <StackPanel Orientation="Horizontal">
                            <Button Style="{DynamicResource NewWorkflowButton}" Command="{Binding Path=NewWorkflowCommand}" AutomationProperties.AutomationId="AIDNewWorkflow"  Width="26" Height="26" Content="Button" x:Name="AddButton" ToolTip="Create" Margin="5,0,0,0" TabIndex="0"/>
                            <Button Style="{DynamicResource ButtonStyleImportBtn}" Command="{Binding Path=ImportWorkflowCommand}" AutomationProperties.AutomationId="AIDImportWorkflow"  Width="26" Height="26" Content="Button" x:Name="AddButton_Copy" ToolTip="Import" Margin="5,0,0,0" TabIndex="1"/>
                            <Button Style="{DynamicResource ButtonStylePackage}" Command="{Binding Path=PackageCommand}" AutomationProperties.AutomationId="AIDPackageWorkflow" Width="26" Height="26" Content="Button" x:Name="PackageButton" ToolTip="Package" Margin="5,0,0,0" TabIndex="2"/>
                            <Button Style="{DynamicResource WorkflowDelete}" Command="{Binding Path=DeleteWorkflowCommand}" AutomationProperties.AutomationId="AIDDeleteWorkflow"  Width="26" Height="26" Content="Button" x:Name="DeleteButton" ToolTip="Delete" Margin="5,0,0,0" TabIndex="3"
                                    IsEnabled="{Binding Path=EditableWorkflowModel.DeleteAllowed}"/>
                            <Button Style="{DynamicResource ButtonLaunchAcl}" Command="{Binding Path=LaunchAclCommand}" AutomationProperties.AutomationId="AIDLaunchAclWorkflow" Width="26" Height="26" Content="Launch Acl" x:Name="LaunchAclButton" ToolTip="Edit permissions for this workflow" Margin="5,0,0,0"
                                    IsEnabled="{Binding Path=EditableWorkflowModel.PermissionSettingsAllowed}"/>
                        </StackPanel>
                    </Border>
                        <Grid VerticalAlignment="Stretch" Margin="5,5,5,5"  Grid.Row="2"  Grid.RowSpan="2">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" MinHeight="67.104"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="40"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Grid HorizontalAlignment="Stretch" Margin="0,0,0,0" Grid.ColumnSpan="1">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="72"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <Image Width="72" HorizontalAlignment="Left" Source="/Microsoft.Research.ScientificWorkflow.TridentUtilities;component/Images/ManagementStudio/workflowsHeaderPic.png"  d:LayoutOverrides="HorizontalAlignment" VerticalAlignment="Top"/>
                                <TextBlock VerticalAlignment="Top" TextAlignment="Justify" Text="Workflow is the process defined by the user to accept inputs and provide desired outputs, after processing the input data through the contained activities.  This catalog provides the interface for editing the basic details for the workflow.  The changes will be saved in the registry and will be reflected wherever the workflow is used.  The creation details of the workflow can also be edited in this catalog." ToolTipService.IsEnabled="False" TextWrapping="Wrap" d:LayoutOverrides="Width" Margin="10,0,0,0" Grid.Column="1"/>
                            </Grid>
                        <Border BorderBrush="#FFC1C1C1" BorderThickness="0,1,0,0" Padding="0,10,0,0" Grid.Row="2">
                            <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                <Button AutomationProperties.AutomationId="btnSave" Command="{Binding Path=SaveWorkflowCommand}" HorizontalAlignment="Right" VerticalAlignment="Top" Width="70" Content="Save" Margin="0,0,100,0" TabIndex="15"/>
                                <Button AutomationProperties.AutomationId="btnCancel" Command="{Binding Path=CancelWorkflowChangesCommand}" HorizontalAlignment="Right" Width="70" Content="Cancel" d:LayoutOverrides="Height" Margin="0,0,20,0" VerticalAlignment="Top" TabIndex="16"/>
                            </Grid>
                        </Border>
                        <ScrollViewer Grid.Row="1" Grid.RowSpan="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                            <StackPanel Margin="0,0,0,0" >
                                <!--Grid.Row="1" Grid.RowSpan="1"-->
                                <Border CornerRadius="5,5,5,5" BorderThickness="0,0,0,0" BorderBrush="#FFC4C4C4" Background="#FFFFFFFF" Margin="60,15,10,0">
                                    <Grid Margin="0,0,0,0">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="125"/>
                                            <ColumnDefinition Width="*"/>
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" MinHeight="20.2"/>
                                            <RowDefinition Height="Auto" MinHeight="6.76000000000001"/>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto" MinHeight="18.52"/>
                                            
                                            <RowDefinition Height="Auto"/>
                                            
                                            <RowDefinition Height="Auto" MinHeight="7.51999999999998"/>
                                            <RowDefinition Height="Auto" MinHeight="19.44"/>
                                            <RowDefinition Height="Auto" MinHeight="19.44"/>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto" MinHeight="19.48"/>
                                            <RowDefinition Height="Auto" MinHeight="7.48000000000002"/>
                                            <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                        <TextBlock HorizontalAlignment="Right" VerticalAlignment="Top" Text="ID:" TextWrapping="Wrap" Margin="0,5,5,0"/>
                                        <TextBox IsEnabled="{Binding Path=EditableWorkflowModel.AreDetailsEditable}" Text="{Binding Path=EditableWorkflowModel.Description, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="AIDDescription"  MaxLength="300" TextWrapping="Wrap" MaxLines="3" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" Width="250" Grid.Column="1" Grid.Row="3" VerticalScrollBarVisibility="Auto" Grid.RowSpan="1" Height="45" TabIndex="5" />
                                        <TextBlock HorizontalAlignment="Right" Text="Description:" TextWrapping="Wrap" d:LayoutOverrides="Height" Grid.Row="3" Margin="0,5,5,0" VerticalAlignment="Top"/>
                                        <ComboBox IsEnabled="{Binding Path=EditableWorkflowModel.AreDetailsEditable}" Grid.Column="1" Grid.Row="4" Margin="0,5,0,0" Width="250" HorizontalAlignment="Left" VerticalAlignment="Top"  TabIndex="6"
                                                   Name="cmbWorkflowType" 
                                                 SelectedValuePath="Content"  SelectedValue="{Binding Path=EditableWorkflowModel.SelectedType}" IsSynchronizedWithCurrentItem="True" AutomationProperties.AutomationId="AIDExecutionTypeCmbBox">
                                            <ComboBoxItem Content="Interactive"></ComboBoxItem>
                                            <ComboBoxItem Content="Non Interactive"></ComboBoxItem>
                                        </ComboBox>
                                        <TextBlock HorizontalAlignment="Right" Text="Type:" TextWrapping="Wrap" d:LayoutOverrides="Height" Grid.Row="4" Margin="0,5,5,0" VerticalAlignment="Top"/>
                                        <TextBlock Text="Image:" TextWrapping="Wrap" VerticalAlignment="Top" d:LayoutOverrides="Width" Grid.Row="6" Margin="0,5,5,0" HorizontalAlignment="Right"/>
                                        <TextBlock Text="Created Date:" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" Grid.Row="13" Margin="0,5,5,0" HorizontalAlignment="Right" VerticalAlignment="Top"/>
                                        <TextBlock Text="Modified By:" TextWrapping="Wrap" Margin="0,5,5,0" d:LayoutOverrides="Width, Height" Grid.Row="14" HorizontalAlignment="Right" VerticalAlignment="Top"/>
                                        <TextBlock Text="Modified Date:" TextWrapping="Wrap" Margin="0,5,5,0" d:LayoutOverrides="Width, Height" Grid.Row="15" VerticalAlignment="Top" HorizontalAlignment="Right"/>
                                        <TextBox Text="{Binding Path=EditableWorkflowModel.Id}"  AutomationProperties.AutomationId="AIDGUID" TextWrapping="Wrap" d:LayoutOverrides="Height" Grid.Column="1" Grid.Row="0" Width="250" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,5,0,0" IsEnabled="False"/>
                                        <Grid HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="1" Grid.Row="5" Margin="0,5,0,0">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto"/>
                                            </Grid.RowDefinitions>
                                            <TextBox AutomationProperties.AutomationId="AIDCategoryPath" Text="{Binding Path=EditableWorkflowModel.ParentBreadcrumb, UpdateSourceTrigger=PropertyChanged}"  IsEnabled="False" ToolTipService.ShowOnDisabled="True" ToolTip="{Binding Path=EditableWorkflowModel.ParentBreadcrumb}" TextWrapping="NoWrap" Margin="0,0,0,0" Width="250" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.RowSpan="1"/>
												<Button AutomationProperties.AutomationId="AIDCategoryBrowse" Command="{Binding Path=BrowseCategoryCommand}" HorizontalAlignment="Left" VerticalAlignment="Top" Content="..." ToolTip="Browse" Width="30" Margin="255,0,0,0" Grid.RowSpan="1" TabIndex="7" IsEnabled="{Binding Path=EditableWorkflowModel.IsNotSharedWF}"/>
                                        </Grid>
                                        <Grid VerticalAlignment="Top" Grid.Row="5" Margin="0,5,8,0" HorizontalAlignment="Right">
                                            <Grid Margin="0,-0.5,-7.5,0" Width="8" Height="8" HorizontalAlignment="Right" VerticalAlignment="Top">
                                                <Path RenderTransformOrigin="0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom" Fill="#FFFF0000" Stretch="Fill" StrokeThickness="0" Data="M18.597656,17.335052 L25.59375,17.335052 L25.382813,29.253021 L36.210938,22.010834 L39.832031,27.424896 L27.667969,34.561615 L39.832031,41.768646 L36.210938,47.112396 L25.242188,39.624115 L25.628906,51.85849 L18.597656,51.85849 L18.808594,39.975677 L8.0859375,47.147552 L4.5,41.73349 L16.59375,34.596771 L4.5703125,27.38974 L8.0859375,21.975677 L18.808594,29.253021 z">
                                                    <Path.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform ScaleX="0.7" ScaleY="0.7"/>
                                                            <SkewTransform AngleX="0" AngleY="0"/>
                                                            <RotateTransform Angle="0"/>
                                                            <TranslateTransform X="0" Y="0"/>
                                                        </TransformGroup>
                                                    </Path.RenderTransform>
                                                </Path>
                                            </Grid>
                                            <TextBlock Text="Category:" TextWrapping="Wrap" Margin="0,0,1,0" VerticalAlignment="Top" d:LayoutOverrides="Width" HorizontalAlignment="Right"/>
                                        </Grid>
                                        <Grid HorizontalAlignment="Stretch" Margin="0,5,0,0" d:LayoutOverrides="Margin" Grid.Column="1" Grid.Row="6">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" MinHeight="19.32"/>
                                                <RowDefinition Height="Auto" MinHeight="17.68"/>
                                            </Grid.RowDefinitions>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto"/>
                                                <ColumnDefinition Width="Auto"/>
                                            </Grid.ColumnDefinitions>
                                            <Button AutomationProperties.AutomationId="AIDImgBrowse" HorizontalAlignment="Left" VerticalAlignment="Top" Content="Browse" ToolTip="Browse" Command="{Binding Path=BrowseImageCommand}" Width="70" Grid.RowSpan="1" Margin="10,0,0,0" Grid.Column="1" TabIndex="8"/>
                                            <Image AutomationProperties.AutomationId="AIDImg" Width="50">
                                                <Image.Source>
                                                    <PriorityBinding FallbackValue="EditableWorkflowModel.DefaultImage">
                                                        <Binding Path="EditableWorkflowModel.PreviewImage" IsAsync="True"/>
                                                        <Binding Path="EditableWorkflowModel.SavedImage" IsAsync="True"/>
                                                        <Binding Path="EditableWorkflowModel.DefaultImage"/>
                                                    </PriorityBinding>
                                                </Image.Source>
                                            </Image>
                                        </Grid>
                                        <Grid VerticalAlignment="Top" Grid.Row="1" Margin="0,5,8,0" HorizontalAlignment="Right">
                                            <Grid Margin="0,-0.5,-7.5,0" Width="8" Height="8" HorizontalAlignment="Right" VerticalAlignment="Top">
                                                <Path RenderTransformOrigin="0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom" Fill="#FFFF0000" Stretch="Fill" StrokeThickness="0" Data="M18.597656,17.335052 L25.59375,17.335052 L25.382813,29.253021 L36.210938,22.010834 L39.832031,27.424896 L27.667969,34.561615 L39.832031,41.768646 L36.210938,47.112396 L25.242188,39.624115 L25.628906,51.85849 L18.597656,51.85849 L18.808594,39.975677 L8.0859375,47.147552 L4.5,41.73349 L16.59375,34.596771 L4.5703125,27.38974 L8.0859375,21.975677 L18.808594,29.253021 z">
                                                    <Path.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform ScaleX="0.7" ScaleY="0.7"/>
                                                            <SkewTransform AngleX="0" AngleY="0"/>
                                                            <RotateTransform Angle="0"/>
                                                            <TranslateTransform X="0" Y="0"/>
                                                        </TransformGroup>
                                                    </Path.RenderTransform>
                                                </Path>
                                            </Grid>
                                            <TextBlock HorizontalAlignment="Right" Text="Name:" TextWrapping="Wrap" Margin="-2,0,0,0" d:LayoutOverrides="Height"  VerticalAlignment="Top"/>
                                        </Grid>
                                        <TextBox HorizontalAlignment="Left" AutomationProperties.AutomationId="AIDWFName" Width="250" MaxLength="75" IsEnabled="{Binding Path=EditableWorkflowModel.AreDetailsEditable}" Text="{Binding Path=EditableWorkflowModel.Name, UpdateSourceTrigger=PropertyChanged}"  TextWrapping="NoWrap" Margin="0,5,0,0" d:LayoutOverrides="Height" Grid.Column="1" Grid.Row="1" VerticalAlignment="Top" TabIndex="4"/>
                                        <TextBlock HorizontalAlignment="Right" Text="Version Label:" Grid.Row="2" TextWrapping="Wrap" Margin="0,5,5,0" d:LayoutOverrides="Height"  VerticalAlignment="Top"/>
                                        <TextBox HorizontalAlignment="Left" AutomationProperties.AutomationId="AIDWFLabel" Grid.Row="2" Grid.Column="1" Width="250" MaxLength="75" Text="{Binding Path=EditableWorkflowModel.VersionLabel, UpdateSourceTrigger=PropertyChanged}" TextWrapping="NoWrap" Margin="0,5,0,0" d:LayoutOverrides="Height" VerticalAlignment="Top" IsEnabled="{Binding Path=EditableWorkflowModel.AllowLabelEdit}"/>
                                        <TextBlock Text="Version:" TextWrapping="Wrap" Margin="0,5,5,0" d:LayoutOverrides="Width, Height" Grid.Row="16" HorizontalAlignment="Right" VerticalAlignment="Top" IsEnabled="False"/>
                                        <TextBox Text="{Binding Path=EditableWorkflowModel.Version}" IsEnabled="False" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="0,5,0,0" Width="250" VerticalScrollBarVisibility="Auto" d:LayoutOverrides="Height" Grid.Column="1" Grid.Row="16" AutomationProperties.AutomationId="AIDWorkflowVersion"/>
                                        <TextBlock Text="Contact:" TextWrapping="Wrap" Margin="0,5,5,0" HorizontalAlignment="Right" d:LayoutOverrides="Height" Grid.Row="11" Grid.RowSpan="1" VerticalAlignment="Top"/>
                                        <TextBox AutomationProperties.AutomationId="AIDContact" IsEnabled="{Binding Path=EditableWorkflowModel.AreDetailsEditable}" Text="{Binding Path=EditableWorkflowModel.Contact, UpdateSourceTrigger=PropertyChanged}"  TextWrapping="NoWrap" HorizontalAlignment="Left" Margin="0,5,0,0" Width="250" VerticalScrollBarVisibility="Auto" d:LayoutOverrides="Height" Grid.Column="1" Grid.Row="11" VerticalAlignment="Top" Grid.RowSpan="1" MaxLength="300" TabIndex="13" />
                                        <TextBlock Text="Owner:" TextWrapping="Wrap" Margin="0,5,5,0" HorizontalAlignment="Right" d:LayoutOverrides="Height" Grid.Row="9" Grid.RowSpan="1" VerticalAlignment="Top"/>
                                        <TextBox AutomationProperties.AutomationId="AIDOwner"  IsEnabled="False" Text="{Binding Path=EditableWorkflowModel.Owner, UpdateSourceTrigger=PropertyChanged}"  TextWrapping="NoWrap" HorizontalAlignment="Left" Margin="0,5,0,0" Width="250" VerticalScrollBarVisibility="Auto" d:LayoutOverrides="Height" Grid.Column="1" Grid.Row="9" VerticalAlignment="Top" Grid.RowSpan="1" MaxLength="300" TabIndex="12" />
                                        <TextBlock Text="Comments:" TextWrapping="Wrap" Margin="0,5,5,0" HorizontalAlignment="Right" d:LayoutOverrides="Height" Grid.Row="8" VerticalAlignment="Top"/>
                                        <TextBox AutomationProperties.AutomationId="AIDComments" IsEnabled="{Binding Path=EditableWorkflowModel.AreDetailsEditable}" Text="{Binding Path=EditableWorkflowModel.Comments, UpdateSourceTrigger=PropertyChanged}"  TextWrapping="Wrap" HorizontalAlignment="Left" Margin="0,5,0,0" Width="250" VerticalScrollBarVisibility="Auto" Grid.Column="1" Grid.Row="8" Height="45" MaxLength="300" MaxLines="3" TabIndex="11" />
                                        <TextBlock Text="Keywords:" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" Grid.Row="7" HorizontalAlignment="Right" Margin="0,5,5,0" VerticalAlignment="Top"/>
                                        <StackPanel HorizontalAlignment="Left" Width="250" Grid.Column="1" Grid.Row="7" VerticalAlignment="Top" Margin="0,5,0,0">
                                            <TextBox AutomationProperties.AutomationId="AIDKeywords" IsEnabled="{Binding Path=EditableWorkflowModel.AreDetailsEditable}" Text="{Binding Path=EditableWorkflowModel.Keywords, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" MaxLines="3" Width="250" VerticalScrollBarVisibility="Auto" d:LayoutOverrides="Height" MaxLength="300" TabIndex="9" />
                                            <TextBlock Foreground="#FF999999" Text="Separate keywords with semicolon" TextWrapping="Wrap"/>
                                        </StackPanel>
                                        <TextBox AutomationProperties.AutomationId="AIDCreatedDate" Text="{Binding Path=EditableWorkflowModel.CreatedDate}" TextWrapping="NoWrap" d:LayoutOverrides="Height" Grid.Row="13" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Width="250" Margin="0,5,0,0" IsEnabled="False"/>
                                        <TextBox AutomationProperties.AutomationId="AIDModifiedDate" Text="{Binding Path=EditableWorkflowModel.LastModifiedTime}" TextWrapping="Wrap" Margin="0,5,0,0" d:LayoutOverrides="Height" Grid.Row="15" HorizontalAlignment="Left" VerticalAlignment="Top" Width="250" Grid.Column="1" IsEnabled="False"/>
                                        <TextBlock Text="Imported By:" TextWrapping="Wrap" Margin="0,5,5,0" d:LayoutOverrides="Width, Height" Grid.Row="12" HorizontalAlignment="Right" VerticalAlignment="Top"/>
                                        <TextBlock Text="Author:" TextWrapping="Wrap" Margin="0,5,5,0" d:LayoutOverrides="Width, Height" Grid.Row="10" HorizontalAlignment="Right" VerticalAlignment="Top"/>
                                        <TextBox AutomationProperties.AutomationId="AIDCreatedBy" Text="{Binding Path=EditableWorkflowModel.CreatedBy}" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="0,5,0,0" Width="250" d:LayoutOverrides="Height" Grid.Column="1" Grid.Row="12" VerticalAlignment="Top" IsEnabled="False"/>
                                        <TextBox AutomationProperties.AutomationId="AIDAuthor" IsEnabled="{Binding Path=EditableWorkflowModel.AreDetailsEditable}" Text="{Binding Path=EditableWorkflowModel.Author, UpdateSourceTrigger=PropertyChanged}"  TextWrapping="NoWrap" HorizontalAlignment="Left" Margin="0,5,0,0" Width="250" VerticalScrollBarVisibility="Auto" d:LayoutOverrides="Height" Grid.Column="1" Grid.Row="10" MaxLength="300" TabIndex="11"/>
                                        <TextBox AutomationProperties.AutomationId="AIDModifiedDate" Text="{Binding Path=EditableWorkflowModel.LastModifiedBy}" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="0,5,0,0" Width="250" IsEnabled="False" d:LayoutOverrides="Height" Grid.Column="1" Grid.Row="14"/>
                                    </Grid>
                                </Border>
                                <Border CornerRadius="5,5,5,5" BorderThickness="1,1,1,1" BorderBrush="#FFD6D6D6" Background="#FFFFFFFF" Height="Auto" Margin="0,10,20,10">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="20"/>
                                            <RowDefinition Height="*"/>
                                        </Grid.RowDefinitions>
                                        <Border HorizontalAlignment="Stretch" Grid.RowSpan="1" CornerRadius="6,6,0,0" BorderThickness="0,0,0,1" BorderBrush="#FFE4E4E4">
                                            <Border.Background>
                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                    <GradientStop Color="#FFEEEEEE" Offset="0"/>
                                                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Border.Background>
                                            <TextBlock Text="Required Parameters" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,0,0,0" FontSize="12"/>
                                        </Border>
                                        <TextBlock Visibility="{Binding Converter={StaticResource boolToVisibilityConverter}, Path=EditableWorkflowModel.HasNoInputParameters}"
                                            Text="No items to be shown" Opacity="0.7" HorizontalAlignment="Center" VerticalAlignment="Center" AutomationProperties.AutomationId="relatedNoItems"
                                                   Grid.Row="1"  Margin="0,5,0,5"/>
                                        <ListView IsSynchronizedWithCurrentItem="True" ItemContainerStyle="{DynamicResource ListViewItemStyleBasic}"
                                                  ItemTemplate="{DynamicResource DataTemplate3}" BorderBrush="#FFD7D7D7" 
                                                  Style="{DynamicResource ListViewStyle1}" Height="90" VerticalAlignment="Top" Grid.Row="1" 
                                                  Margin="10,10,10,10" ItemsSource="{Binding Path=EditableWorkflowModel.ParameterList}"
                                                   Visibility="{Binding Converter={StaticResource boolToVisibilityConverter}, Path=EditableWorkflowModel.HasInputParameters}" TabIndex="13">
                                            <ListView.View>

                                                <GridView>
                                                    <GridViewColumn  Width="250" DisplayMemberBinding="{Binding Path=Name}">
                                                        <GridViewColumn.Header>
                                                            <TextBlock Text="Name"  AutomationProperties.Name="ANameParameterName"/>
                                                        </GridViewColumn.Header>

                                                        <GridViewColumn.CellTemplate>
                                                            <DataTemplate>
                                                                <TextBlock Text="{Binding Path=Name}" ToolTip="{Binding Path=Name}"  TextTrimming="CharacterEllipsis" MaxHeight="15" AutomationProperties.Name="{Binding Path=Name}" />
                                                            </DataTemplate>
                                                        </GridViewColumn.CellTemplate>
                                                    </GridViewColumn>
                                                    <GridViewColumn  Width="250" DisplayMemberBinding="{Binding Path=DataType}">
                                                        <GridViewColumn.Header>
                                                            <TextBlock Text="Data Type" AutomationProperties.Name="ANameParameterType"/>
                                                        </GridViewColumn.Header>

                                                        <GridViewColumn.CellTemplate>
                                                            <DataTemplate>
                                                                <TextBlock Text="{Binding Path=DataType}" ToolTip="{Binding Path=DataType}"  TextTrimming="CharacterEllipsis" MaxHeight="15" AutomationProperties.Name="{Binding Path=DataType}" />
                                                            </DataTemplate>
                                                        </GridViewColumn.CellTemplate>
                                                    </GridViewColumn>
                                                    <GridViewColumn  Width="250" DisplayMemberBinding="{Binding Path=Value}">
                                                        <GridViewColumn.Header>
                                                            <TextBlock Text="Default Value" AutomationProperties.Name="ANameParameterValue"/>
                                                        </GridViewColumn.Header>

                                                        <GridViewColumn.CellTemplate>
                                                            <DataTemplate>
                                                                <TextBlock Text="{Binding Path=Value}" ToolTip="{Binding Path=Value}"  TextTrimming="CharacterEllipsis" MaxHeight="15" AutomationProperties.Name="{Binding Path=Value}" />
                                                            </DataTemplate>
                                                        </GridViewColumn.CellTemplate>
                                                    </GridViewColumn>

                                                </GridView>
                                            </ListView.View>
                                        </ListView>
                                    </Grid>
                                </Border>
                                <Border CornerRadius="5,5,5,5" BorderThickness="1,1,1,1" BorderBrush="#FFD6D6D6" Background="#FFFFFFFF" Margin="0,0,20,10">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="20"/>
                                            <RowDefinition Height="*"/>
                                        </Grid.RowDefinitions>
                                        <Border HorizontalAlignment="Stretch" Grid.RowSpan="1" CornerRadius="6,6,0,0" BorderThickness="0,0,0,1" BorderBrush="#FFE4E4E4">
                                            <Border.Background>
                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                    <GradientStop Color="#FFEEEEEE" Offset="0"/>
                                                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Border.Background>
                                            <TextBlock Text="Related Assemblies" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,0,0,0" FontSize="12"/>
                                        </Border>

                                        <TextBlock Visibility="{Binding Converter={StaticResource boolToVisibilityConverter}, Path=EditableWorkflowModel.HasNoAssemblies}"
                                            Text="No items to be shown" Opacity="0.7" HorizontalAlignment="Center" VerticalAlignment="Center" AutomationProperties.AutomationId="relatedNoItems"
                                                   Grid.Row="1"  Margin="0,5,0,5"/>
                                        <ListView IsSynchronizedWithCurrentItem="True" ItemContainerStyle="{DynamicResource ListViewItemStyleBasic}" 
                                                  BorderBrush="#FFD7D7D7" Style="{DynamicResource ListViewStyle1}"
                                                  Height="90" VerticalAlignment="Top" Grid.Row="1" Margin="10,10,10,10" ItemsSource="{Binding Path=EditableWorkflowModel.LibraryList}" AutomationProperties.AutomationId="AIDLibraryList"
                                                  Visibility="{Binding Converter={StaticResource boolToVisibilityConverter}, Path=EditableWorkflowModel.HasAssemblies}" TabIndex="14">
                                            <ListView.View>
                                                <GridView>
                                                    <GridViewColumn  Width="250"  DisplayMemberBinding="{Binding Path=Name}" >
                                                        <GridViewColumn.Header>
                                                            <TextBlock Text="Name"  AutomationProperties.Name="ANameAssemblyName" MinWidth="150"/>
                                                        </GridViewColumn.Header>

                                                        <GridViewColumn.CellTemplate>
                                                            <DataTemplate>
                                                                <TextBlock Text="{Binding Path=Name}" ToolTip="{Binding Path=Name}"  TextTrimming="CharacterEllipsis" MaxHeight="15" AutomationProperties.Name="{Binding Path=Name}" />
                                                            </DataTemplate>
                                                        </GridViewColumn.CellTemplate>
                                                    </GridViewColumn>

                                                    <GridViewColumn  Width="250"  DisplayMemberBinding="{Binding Path=ModifiedDate}" >
                                                        <GridViewColumn.Header>
                                                            <TextBlock Text="Modified Date"  AutomationProperties.Name="ANameModifiedDate" MinWidth="150"/>
                                                        </GridViewColumn.Header>

                                                        <GridViewColumn.CellTemplate>
                                                            <DataTemplate>
                                                                <TextBlock Text="{Binding Path=ModifiedDate}" ToolTip="{Binding Path=ModifiedDate}"  TextTrimming="CharacterEllipsis" MaxHeight="15" AutomationProperties.Name="{Binding Path=ModifiedDate}" />
                                                            </DataTemplate>
                                                        </GridViewColumn.CellTemplate>
                                                    </GridViewColumn>

                                                    <GridViewColumn  Width="150"  DisplayMemberBinding="{Binding Path=ModifiedBy}" >
                                                        <GridViewColumn.Header>
                                                            <TextBlock Text="Modified By"  AutomationProperties.Name="ANameModifiedBy" MinWidth="150"/>
                                                        </GridViewColumn.Header>

                                                        <GridViewColumn.CellTemplate>
                                                            <DataTemplate>
                                                                <TextBlock Text="{Binding Path=ModifiedBy}" ToolTip="{Binding Path=ModifiedBy}"  TextTrimming="CharacterEllipsis" MaxHeight="15" AutomationProperties.Name="{Binding Path=ModifiedBy}" />
                                                            </DataTemplate>
                                                        </GridViewColumn.CellTemplate>
                                                    </GridViewColumn>

                                                    <GridViewColumn  Width="150"  DisplayMemberBinding="{Binding Path=Version}" >
                                                        <GridViewColumn.Header>
                                                            <TextBlock Text="Version"  AutomationProperties.Name="ANameVersion" MinWidth="150"/>
                                                        </GridViewColumn.Header>

                                                        <GridViewColumn.CellTemplate>
                                                            <DataTemplate>
                                                                <TextBlock Text="{Binding Path=Version}" ToolTip="{Binding Path=Version}"  TextTrimming="CharacterEllipsis" MaxHeight="15" AutomationProperties.Name="{Binding Path=Version}" />
                                                            </DataTemplate>
                                                        </GridViewColumn.CellTemplate>
                                                    </GridViewColumn>
                                                </GridView>
                                            </ListView.View>
                                        </ListView>
                                    </Grid>
                                </Border>
                            </StackPanel>
                        </ScrollViewer>
                    </Grid>
                  
                    <Border Margin="0,0,0,0" CornerRadius="5,5,0,0" BorderThickness="0,0,0,1" Grid.Row="0" BorderBrush="#FFFFFFFF">
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                <GradientStop Color="#FFE8E8E8" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.Background>
                        <TextBlock Text="Workflow" TextWrapping="Wrap" FontSize="14" FontWeight="Normal" Margin="7,2,0,0"/>
                    </Border>
                </Grid>
            </Border>
            <Border x:Name="PackagingViewHost"
                    Visibility="{Binding Converter={StaticResource boolToVisibilty}, Path=ShowPackaging}">
            </Border>
        </Grid>
    </Grid>
</UserControl>
